<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>后盾人</title>
    <style>
        * {
            padding: 0;
            margin: 0;
        }

        body {
            width: 100vw;
            height: 100vh;
            background: #34495e;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        main {
            width: 400px;
            height: 400px;
            border: solid 1px #ddd;
        }

        div {
            width: 100px;
            height: 100px;
            background: #f1c40f;
            animation-name: hd;
            animation-duration: 5s;
        }

        @keyframes hd {
            25% {
                transform: translateX(300px);
            }

            50% {
                transform: translate(300px, 300px);
                background: #f1c40f;
                border-radius: 0;
            }

            75% {
                transform: translateY(300px);
            }

            25%,
            75% {
                background: #9b59b6;
                border-radius: 50%;
            }
        }
    </style>
</head>

<body>
    <main>
        <div></div>
    </main>
</body>

</html>